﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ExamCommon
{
    /// <summary>
    /// 消息命令类型
    /// </summary>
    public enum MsgCommand
    {
        /// <summary>
        /// 空
        /// </summary>
        NONE,

        /// <summary>
        /// 测试连接
        /// </summary>
        TEST,

        /// <summary>
        /// 客户端登录
        /// </summary>
        LOGIN,

        /// <summary>
        /// 登录成功
        /// </summary>
        LOGIN_SUCCESS,

        /// <summary>
        /// 登录失败
        /// </summary>
        LOGIN_FAIL,

        /// <summary>
        /// 重复登录
        /// </summary>
        REPEAT_LOGIN,

        /// <summary>
        /// 客户端登出
        /// </summary>
        LOGOUT,

        /// <summary>
        /// 客户端程序退出
        /// </summary>
        EXIT,

        /// <summary>
        /// 服务端程序退出
        /// </summary>
        SERVER_EXIT,

        /// <summary>
        /// 强制客户端下线
        /// </summary>
        FORCE_OFFLINE,

        /// <summary>
        /// 常规通讯
        /// </summary>
        GENERAL
    }

    /// <summary>
    /// 消息内容类型
    /// </summary>
    public enum MsgType
    {
        /// <summary>
        ///空消息
        /// </summary>
        NONE,
        
        /// <summary>
        ///文本消息
        /// </summary>
        TEXT,

        /// <summary>
        /// 试卷信息
        /// </summary>
        EXAMPAPER,

        /// <summary>
        /// 试卷作答记录
        /// </summary>
        EXAMPAPER_RECORD,

        /// <summary>
        /// 练习册信息
        /// </summary>
        EXERCISE,

        /// <summary>
        ///发送文件
        /// </summary>
        FILE
    }

    /// <summary>
    /// 消息发送状态(用于消息循环接收的开始和技术标识)
    /// </summary>
    public enum MsgSendState
    {
        /// <summary>
        /// 单条消息，一次性接收
        /// </summary>
        SINGLE,

        /// <summary>
        /// 消息开始
        /// </summary>
        START,

        /// <summary>
        /// 消息发送中
        /// </summary>
        SENDING,

        /// <summary>
        /// 消息结束
        /// </summary>
        END
    }
}
